<?php
// @formatter:off
/**
 * @file WCBasicContainer.php
 * @author Alejandro Dario Simi
 * @date $Date: 2013-07-11 21:02:48 +0000 (Thu, 11 Jul 2013) $
 *
 * $Id: WCBasicContainer.php 95 2013-07-11 21:02:48Z daemonraco@gmail.com $
 * $URL: http://wcomix.googlecode.com/svn/tags/wcomix-1.0/includes/containers/WCBasicContainer.php $
 */
// @formatter:on

/**
 * @class WCBasicContainer
 * This class represents a container for objects managed by certain
 * WCBasicHolder. It logic allows to access this objects in many way, like by id,
 * by name and others.
 */
class WCBasicContainer extends WCContainer {
	/**
	 * Specific constructor of this class.
	 *
	 * @param WCGHolder $holder This will be the element's holder to be used
	 * on those items with delayed loading.
	 * @param boolean $invalids This parameter activates the loading of
	 * elements with issues.
	 */
	public function __construct(WCBasicHolder &$holder, $invalids = false) {
		//
		// Calling the basic constructor.
		parent::basicConstructor($holder, $invalids);
	}
	/**
	 * Specific destructor of this class.
	 */
	public function __destruct() {
		//
		// Calling the basic destructor.
		parent::basicDestructor();
	}
	//
	// Protected methods.
	/**
	 * This method asks to the element's holder for certain element based on
	 * its id.
	 *
	 * @param int $id ID of the element to requested.
	 */
	protected function loadItemFromHolder($id) {
		//
		// Asking for the element based on its id.
		return $this->_holder->item($id);
	}
}
?>